'use strict';const _5i=document.currentScript.parentElement;function _yt(a,b={},h=_Qu){let l=_ne("basicForm",{},_5i).addClass(b.type||"info").addClass(!1===b.btn?"noBtn":"").append(_ne("messageForm",{},_5i));l.find("msg").css("maxWidth",b.width||"").append(a);l.find("button").click(function(){_5p(this);h()});return _2(b.title||"",l,"noClose",b.nearMouse,!0)}
function _Yo(a,b,h={}){return l=>{var k=_ne("confirmForm",{},_5i).addClass(h.icon||"confirm");k.find("msg").css("maxWidth",h.width||"").append(b);let q=k.find("button[accept]").html(h.yes||"Yes")[0];k.find("button[cancel]").html(h.no||"No");$("button",k).click(function(){l($(this).is("[accept]"),_pu($(this).closest("form")[0]))||_5p(this)});h.enterOk&&k.keydown(f=>{13==f.keyCode&&q.click()});return _2(a,k,"noClose",h.nearMouse,!0)}}
function _Sa(a,b={}){return h=>{a=_ne("basicForm",{},_5i).addClass(b.icon||"confirm").append(a).on("click","button[value]",function(){let l=this.value;_5p(this);h(l)}).find("msg").css("maxWidth",b.width||"").end();return _2(b.title,a,"",b.nearMouse,null==b.modal?!0:b.modal)}}function _5p(a,b=!0){$(a).closest("dialog").triggerEvt({close:b})}function _2(a,b,h="",l=!0,k=!1){return _4f(a,b,h,!1,null,l&&"mouse").Show(k)}
{let a=[];var _xo=function(b,h){b=[b,h,new _0g,new _0g];a.push(b);1==a.length&&_nd(function*(){for(;a.length;){let l=_yt(a[0][0],{type:"success",btn:!1});a[0][2].send("",!0);yield _Pi(a[0][1]);_5p(l);a[0][3].send("",!0);a.shift()}});return{onShow:b[2].wait(),onHide:b[3].wait()}}}
function _4f(a,b,h,l,k,q){const f=_ne(l?"dialog2":"dialog",{},_5i).appendTo("body").addClass(h).submit(!1).on("click","button",c=>c.preventDefault()).on("close",function(c,m){if(!c.originalEvent.defaultPrevented||m)this.remove(),_y()}).on("dialogOpen focusGained focusLost",function(c,m){var p=$(this).hasClass("active"),n="focusLost"==c.type;"dialogOpen"==c.type&&_Tr(this);(n=p&&n||!p&&!n)&&$(this).toggleClass("active",!p);(n||"focusGained"==c.type&&"force"==m)&&$((l?"diagFrm":"")+"> content > *",
this).triggerEvt(c.type)});if(l)f.on("mousedown","> row > [d]",function(c){c.preventDefault();if(!f.is(".maximized")){$(document.body).css("pointer-events","none").parent().css("cursor",$(this).css("cursor"));var m=c.clientX,p=c.clientY,n=f[0].getBoundingClientRect();c={t(d,e,g){d.top+=g;r=!0},l(d,e,g){d.left+=e;u=!0},r(d,e,g){d.right+=e},b(d,e,g){d.bottom+=g},tl(d,e,g){this.t(d,e,g);this.l(d,e,g)},tr(d,e,g){this.t(d,e,g);this.r(d,e,g)},bl(d,e,g){this.b(d,e,g);this.l(d,e,g)},br(d,e,g){this.b(d,e,
g);this.r(d,e,g)}};var t=c[$(this).attr("d")].bind(c),r,u;$(document).on("mousemove.diagRedim",d=>{const e=n.sc();r=u=!1;t(e,d.clientX-m,d.clientY-p);f.css({width:Math.max(0,e.right-e.left),height:Math.max(0,e.bottom-e.top)});u&&f.css("left",e.right-f[0].offsetWidth);r&&f.css("top",e.bottom-f[0].offsetHeight)}).on("mouseup.diagRedim",function(){$(this).off(".diagRedim");$(document.body).css("pointer-events","");f.triggerEvt("redimDone")})}});a?($("header l",f).html(a),$("header b",f).click(function(){_5p(this,
!1)}),$("header",f).mousedown(function(c){c.preventDefault();let m=$(this).closest("dialog");if(!m.is(".maximized")&&!c.target.closest("ctrls")){$(document.body).css("pointer-events","none").parent().css("cursor",$(this).css("cursor"));var p=c.clientX-m[0].offsetLeft,n=c.clientY-m[0].offsetTop,t;$(document).on("mousemove.dialogDrag",function(r){m.css({top:r.clientY-n,left:r.clientX-p});t=!0}).on("mouseup.dialogDrag",function(){$(this).off(".dialogDrag");$(document.body).css("pointer-events","");t&&
f.triggerEvt("redimDone")})}})):$("header",f).addClass("hidden");$("content",f).append(b);f[0].Show=function(c){$(this).addClass("beforePopup1 transformAndOpacityBounceFast");$(this).attr("modal",!!c);this[c?"showModal":"show"]();$(this).triggerEvt("dialogOpen").removeClass("beforePopup1");return this};k&&f.css({width:k[0],height:k[1]});a=_Mg(q)?{left:_Qe(q[0],-10,window.innerWidth-(k?k[0]/2:100)),top:_Qe(q[1],-10,window.innerHeight-(k?k[1]/2:100))}:_Sp(f,"mouse"==q);a:for(;;){for(let c of document.querySelectorAll("dialog"))if(8>
Math.abs(c.offsetLeft-a.left)&&8>Math.abs(c.offsetTop-a.top)){a.left+=15;a.top+=15;continue a}break}return _I(f).css(a)[0]}function _pg(a=!0){a?$("busySign")[0]||_ne("busySign",{},_5i).addClass("float").appendTo("body"):$("busySign.float").remove()};
